import React from "react";
import "../css/Login.css";
export default class App extends React.Component{
  constructor(props){
    super(props) 
  }

  render(){
    return(
      <div className="login_container">
          <div className="login_wrapper">
              <div>账号登录</div>
              <input type="text" placeholder="邮箱/手机号码/小米ID" ref="username"/>
              <br/>
              <input type="password" placeholder="密码" ref="password"/>
              <br/>
              <button onClick={()=>{
                console.log(this.props)
                // console.log(this.refs.username)
                var username = this.refs.username.value;
                var password = this.refs.password.value;
                this.props.history.push({
                    pathname:"/",
                    state:{
                        username:username,
                        password:password
                    }
                })
              }}>登录</button>
          </div>
      </div>
    )
  }
}
